#include <bits/stdc++.h>
#define int long long
using namespace std;

template<typename T> inline void read(T &x)
{
	x = 0;
	T f = 1;char ch = getchar();
	while(ch<'0'||ch>'9')
	{
		if(ch=='-')
		{
			f = -1,ch = getchar();
			break;
		}
		ch = getchar();
	}
	while(ch>='0'&&ch<='9')
		x = (x<<3)+(x<<1)+ch-48,ch = getchar();
	x*=f;
}
template<typename T = int> inline T read()
{
	T x;read(x);return x;
}
template<typename T> void write(T x)
{
    if(x<0) x = -x,putchar('-');
    if(x>9) write(x/10);
    putchar(x%10+48);
}
template<typename T> inline void writen(T x)
{
    write(x);
	putchar(10);
}
const int N = 1e5+5;
int n,m,q,X[N],Y[N],P[N],val[N],f[N],dep[N];
vector<int> g[N];
void dfs(int u,int fa)
{
    f[u] = fa,dep[u] = dep[fa]+1;
    for(auto v:g[u])
    {
        if(v==fa) continue;
        dfs(v,u);
    }
}
namespace sub1{
    bool vis[N];
    int dfs(int u,int fa,int p)
    {
        if(p<0) return 0;
        // if(p<0||vis[u]) return 0;
        // vis[u] = 1;
        int res = val[u];
        for(auto v:g[u])
        {
            if(v==fa) continue;
            res = max(res,dfs(v,u,p-1)-1);
        }
        return res;
    }
    vector<int> p1,p2;
    inline void main()
    {
        for(int _ = 1,x,y,p;_<=q;_++)
        {
            x = X[_],y = Y[_],p = P[_];
            if(x==y)
            {
                puts("YES");
                continue;
            }
            p1.clear(),p2.clear();
            // cout<<x<<' '<<y<<' '<<dep[x]<<' '<<dep[y]<<'\n';
            while(dep[x]>dep[y]) p1.push_back(x),x = f[x];
            while(dep[x]<dep[y]) p2.push_back(y),y = f[y];
            // cout<<x<<' '<<y<<'\n';
            while(x!=y) p1.push_back(x),p2.push_back(y),x = f[x],y = f[y];
            int l = x,las;
            bool fl = 1;
            for(auto i:p1)
            {
                // cout<<i<<" ";
                int las = p;
                while(1)
                {
                    p = max(p,dfs(i,0,p));
                    if(p==las) break;
                    las = p;
                }
                p--;
                if(p<0)
                {
                    fl = 0,las = i;
                    break;
                }
            }
            // cout<<l<<' ';
            int las = p;
            while(1)
            {
                p = max(p,dfs(l,0,p));
                if(p==las) break;
                las = p;
            }
            p--;
            if(p<0&&fl) fl = 0,las = l;
            reverse(p2.begin(),p2.end());
            for(auto i:p2)
            {
                int las = p;
                while(1)
                {
                    p = max(p,dfs(i,0,p));
                    if(p==las) break;
                    las = p;
                }
                if(i==Y[_]) break;
                p--;
                if(p<0&&fl)
                {
                    fl = 0,las = i;
                    // if(i==Y[_]&&p==-1) fl = 1;
                    break;
                }
            }
            // cout<<'\n';
            if(las==Y[_]) fl = 1;
            // if(p==-1) fl = 1;
            if(fl) puts("YES");
            else puts("NO");
        }
    }
}
signed main()
{
	freopen("shu.in","r",stdin);
	freopen("shu.out","w",stdout);
    read(n),read(m),read(q);
    for(int i = 1,u,v;i<n;i++)
        read(u),read(v),g[u].push_back(v),g[v].push_back(u);
    for(int i = 1;i<=q;i++)
        read(X[i]),read(Y[i]),read(P[i]);
    for(int i = 1,x,v;i<=m;i++)
        read(x),read(v),val[x] = max(val[x],v);
    dfs(1,0);
    if(n<=1000&&q<=1000) sub1::main();
	return 0;
}